import config from "@/config"
import http from "@/utils/request"
export const showPageApi = {
    url: `${config.BASE_URL}/reservesoldiers/lottery/selectlottery`,
    name: "展示页面数据",
    get: async function(data){
        return await http.get(`${this.url}?pageNum=${data.pageNum}&pageSize=${data.pageSize}`);
    }
}
// 导出兵役信息列表
export async function exportApi() {
    let res = await fetch(`${config.BASE_URL}/reservesoldiers/lottery/export`, {
        method: 'post',
        headers: {
            'Content-Type': 'application/json',
        }
    }).then(res => res.blob()).then(data => {
        var blobUrl = window.URL.createObjectURL(data);
        return blobUrl
    })
    return res
}
